import request from '@/utils/request';

// 获取待评分的任务列表
export async function getScoreTaskList(params) {
    return request('/api/oa/v1/work/task/score/my/score', {
        method: 'POST',
        data: params
    });
}
// 获取待发起的任务列表
export async function getWaitForStartTaskList(params) {
    return request('/api/oa/v1/work/task/taskinfos/score/to_launch', {
        method: 'POST',
        data: params
    });
}
// 发起评分
export async function launchTaskRate(params) {
    return request('/api/oa/v1/work/task/score/actions/launch', {
        method: 'POST',
        data: params
    });
}
// 移入无需评分
export async function moveToNoRate(params) {
    return request('/api/oa/v1/work/task/score/actions/move_to_no_require', {
        method: 'POST',
        data: params
    });
}
// 移回待发起
export async function moveToLaunch(params) {
    return request('/api/oa/v1/work/task/score/actions/move_to_launch', {
        method: 'POST',
        data: params
    });
}
// 获取已发起的任务列表
export async function getAlreadyStartTaskList(params) {
    return request('/api/oa/v1/work/task/taskinfos/score/launched', {
        method: 'POST',
        data: params
    });
}
// 获取无需评分的任务列表
export async function getNoScoreTaskList(params) {
    return request('/api/oa/v1/work/task/taskinfos/score/not_required', {
        method: 'POST',
        data: params
    });
}
// 获取任务的人工评分列表
export async function getManScoreRecordList(params) {
    return request('/api/oa/v1/work/task/score/score_records', {
        method: 'POST',
        data: params
    });
}

// 获取重评人员下拉
export async function getReRateEmployeeList(params) {
    return request('/api/oa/v1/work/task/score/rescoreemployees', {
        method: 'POST',
        data: params
    });
}

// 重评申请和重估申请前校验
export async function checkTaskBeforeApply(params) {
    return request(`/api/oa/v1/work/task/taskinfos/${params.taskId}/checktaskbeforeapply`, {
        method: 'GET'
    });
}

// 重评申请和审核信息
export async function getRescoreApplyInfo(params) {
    return request(`/api/oa/v1/work/task/score/${params.taskScoreDetailId}/rescore_apply_info`, {
        method: 'GET'
    });
}

// 获取估算记录列表
export async function getEstimateRecordList(params) {
    return request('/api/oa/v1/work/task/estimation/gettaskestimationlist', {
        method: 'POST',
        data: params
    });
}

// 估算记录中获取估算概况
export async function getEstimateRecordInfo(params) {
    return request(`/api/oa/v1/work/task/estimation/gettaskestimationsituation/${params}`, {
        method: 'GET'
    });
}
